package com.hui.qiniucloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;

import java.time.LocalDateTime;

@Schema(description = "AI角色实体")
@TableName("`character`")
@Data
public class AICharacter {

    // Getters and Setters
    @Getter
    @Schema(description = "角色唯一标识符", example = "harry_potter")
    @TableId(type = IdType.INPUT)
    private String id;

    @Schema(description = "角色头像", example = "https://img.qiniucdn.com/avatar/harry_potter.jpg")
    private String avatar;

    @Schema(description = "角色图片", example = "https://img.qiniucdn.com/voice/harry_potter.jpg")
    private String image;

    @Schema(description = "角色名称", example = "哈利·波特")
    private String name;

    @Schema(description = "角色简介", example = "霍格沃茨魔法学校的学生，拥有闪电形伤疤的男巫")
    private String description;

    @Schema(description = "角色系统提示词，用于定义AI的对话风格和背景")
    private String systemPrompt;

    @Schema(description = "角色性格特征", example = "勇敢、忠诚、有时冲动但内心善良")
    private String personality;

    @Schema(description = "角色背景设定", example = "孤儿出身，在德思礼家长大，11岁时发现自己是巫师")
    private String background;

    @Schema(description = "语音类型标识符，用于TTS服务", example = "BV001_streaming")
    private String voiceType;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    @Schema(description = "问题1")
    private String question1;

    @Schema(description = "问题2")
    private String question2;

    @Schema(description = "问题3")
    private String question3;
    @Schema(description = "逻辑删除标识：0-未删除，1-已删除")
    @TableLogic
    private Integer deleted;

    private Long userId;

    public AICharacter() {}

    public AICharacter(String id, String name, String description, String systemPrompt,
                    String personality, String background, String voiceType) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.systemPrompt = systemPrompt;
        this.personality = personality;
        this.background = background;
        this.voiceType = voiceType;
    }
}